home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Pedestal / Source / Sources / Panes / PedPane.cc < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  1.8 KB  |  153 lines

  1. /*    ==========
  2.  *    PedPane.cc
  3.  *    ==========
  4.  */
  5.  
  6. #include "PedestalDebugging.h"
  7.  
  8. #include "PedPane.hh"
  9. #include "PedView.hh"
  10.  
  11.  
  12. PedPane::PedPane(PedView &inSuperView)
  13. : mSuperView(inSuperView)
  14. {
  15.     const Rect emptyRect = {0, 0, 0, 0};
  16.     mBounds = mAperture = emptyRect;
  17.     inSuperView.GetFrame(mBounds);
  18.     inSuperView.retain();
  19.     inSuperView.Focus();
  20. }
  21.  
  22. PedPane::~PedPane()
  23. {
  24.     Close();
  25.     mSuperView.release();
  26. }
  27.  
  28. void
  29. PedPane::Dispose()
  30. {
  31.     Close();
  32. }
  33.  
  34. void
  35. PedPane::GetBounds(Rect &outBounds)
  36. {
  37.     outBounds = mBounds;
  38. }
  39.  
  40. void
  41. PedPane::SetBounds(const Rect &inBounds)
  42. {
  43.     mBounds = inBounds;
  44. }
  45.  
  46. void
  47. PedPane::GetAperture(Rect &outAperture)
  48. {
  49.     outAperture = mAperture;
  50. }
  51.  
  52. void
  53. PedPane::SetAperture(const Rect &inAperture)
  54. {
  55.     mAperture = inAperture;
  56. }
  57.  
  58. bool
  59. PedPane::PointInBounds(Point inPoint)
  60. {
  61.     // Assume inPoint is in view/frame coordinates
  62.     Rect bounds;
  63.     GetBounds(bounds);
  64.     return ::PtInRect(inPoint, &bounds);
  65. }
  66.  
  67. bool
  68. PedPane::PointInAperture(Point inPoint)
  69. {
  70.     // Assume inPoint is in view/frame coordinates
  71.     Rect aperture;
  72.     GetAperture(aperture);
  73.     return ::PtInRect(inPoint, &aperture);
  74. }
  75.  
  76.  
  77. void
  78. PedPane::Open()
  79. {
  80. }
  81.  
  82. void
  83. PedPane::Close()
  84. {
  85. }
  86.  
  87. void
  88. PedPane::Activate()
  89. {
  90. }
  91.  
  92. void
  93. PedPane::Deactivate()
  94. {
  95. }
  96.  
  97. void
  98. PedPane::Resize(short inWidth, short inHeight)
  99. {
  100.     mBounds.right = mBounds.left + inWidth;
  101.     mBounds.bottom = mBounds.top + inHeight;
  102.     // FIXME:  This may not be correct
  103.     mAperture.right = mAperture.left + inWidth;
  104.     mAperture.bottom = mAperture.top + inHeight;
  105. }
  106.  
  107. void
  108. PedPane::DrawContent()
  109. {
  110.     Draw();
  111. }
  112.  
  113. void
  114. PedPane::Draw()
  115. {
  116. }
  117.  
  118. void
  119. PedPane::DispatchNullEvent(EventRecord &inEvent)
  120. {
  121.     
  122. }
  123.  
  124. void
  125. PedPane::DispatchClickEvent(EventRecord &inEvent)
  126. {
  127. }
  128.  
  129. void
  130. PedPane::DispatchKey(EventRecord &inEvent)
  131. {
  132. }
  133.  
  134. void
  135. PedPane::Cut()
  136. {
  137. }
  138.  
  139. void
  140. PedPane::Copy()
  141. {
  142. }
  143.  
  144. void
  145. PedPane::Paste()
  146. {
  147. }
  148.  
  149. void
  150. PedPane::Clear()
  151. {
  152. }
  153.